from pypinyin import lazy_pinyin


def conv_name_from_zh_to_en(name_zh):
    name_zh_ls = lazy_pinyin(name_zh)

    assert len(name_zh) >= 2, f"姓名[{name_zh}]的长度小于2?"

    if name_zh[:2] in ['诸葛', '慕容', '皇甫', '轩辕']:
        assert len(name_zh) >= 3, f"复姓姓名[{name_zh}]的长度小于2?"
        name_en = name_zh_ls[0].capitalize() + name_zh_ls[1] + ' ' + ''.join(name_zh_ls[2:]).capitalize()
    else:
        name_en = name_zh_ls[0].capitalize() + ' ' + ''.join(name_zh_ls[1:]).capitalize()
    return name_en

